home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / TwinOpus2 / REXX / DOpus / Parent.rexx < prev    next >
OS/2 REXX Batch file  |  1994-10-13  |  1KB  |  48 lines

  1. /*
  2.  *
  3.  * Go to the parent directory in TwinExpres from DOpus.
  4.  *
  5.  * (c) 1994 by K.P. van Beem (2:280/464.2, patrick.van.beem@aobh.xs4all.nl)
  6.  *
  7.  * Based on the DOpusLhaARexx package by Geoff Seeley (but you can better
  8.  * use GuiArc in stead of DOpus and a script, to deal with archives)
  9.  *
  10.  */
  11.  
  12. DOpusPort   = 'DOPUS.1'
  13.  
  14. if ~show(l,"rexxsupport.library") then        
  15.     call addlib("rexxsupport.library",0,-30,0)
  16. if showlist('Ports', DOpusPort) = 0 then do
  17.    say 'Directory Opus Arexx port not found. Aborting.'
  18.    exit
  19. end
  20.  
  21. address 'DOPUS.1'
  22. options results
  23.  
  24. /* setup DOpus window and tell user what's happening */
  25. Busy on
  26. TopText "Getting directory of CD, please wait..."
  27.  
  28.  
  29. /* Get the current directory */
  30. 'Status 6 -1'
  31. GetEntry Result
  32. FilePath = Result
  33. if left(FilePath,1) ~= '*' then do
  34.    TopText "You are not in a 'Twin' directory."
  35.    Busy off
  36.    exit
  37. end
  38. FilePath = SubStr(FilePath,2)
  39. if right(FilePath,1) = ':' then do
  40.    TopText "You are already at the root"
  41.    Busy off
  42.    exit
  43. end
  44. Slash=LastPos('/',FilePath)
  45. if Slash = 0 then Slash=LastPos(':',FilePath)+1
  46. FilePath = Left(FilePath,Slash-1)
  47. address AREXX "Rexx:DOpus/ReadDir.rexx" FilePath
  48.